<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>

<body>
<script>
	//删除数组里面的空字符串
	//var arr=[2,3,4,'',432,'','a']
	var arr=[['a','b',''],['c','','d'],['e','','f']]
//	arr.push('f','g');
	//alert(arr)
	function delnull(arr){
		if(typeof arr!=='object'){
			return 'is not array';	
		};	
		var newarr=[];
		for(var i=0;i<arr.length;i++){
			if(typeof arr[i]=='object'){
				newarr.push(delnull(arr[i]))
			}else{
				if(arr[i]!==''){
					newarr.push(arr[i])	
				};	
			}
		};
		return newarr;
	};
	
	alert(delnull(arr));
	
	
</script>
</body>
</html>
